﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using GroupShop.Web.Models;

namespace GroupShop.Web.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            ViewBag.Message = "Welcome to ASP.NET MVC!";

            return View();
        }

        public ActionResult About()
        {
            return View();
        }

        public PartialViewResult CategoryView()
        {
            List<CategoryViewModel> category = new List<CategoryViewModel>
            { 
                new CategoryViewModel{Id =1, FId=0, CategroyName="全部"},
                new CategoryViewModel{Id =2, FId=0, CategroyName="服装"},
                new CategoryViewModel{Id =2, FId=0, CategroyName="服装"},
                new CategoryViewModel{Id =2, FId=0, CategroyName="服装"},
                new CategoryViewModel{Id =2, FId=0, CategroyName="服装"},
                new CategoryViewModel{Id =2, FId=0, CategroyName="服装"},
                new CategoryViewModel{Id =2, FId=0, CategroyName="服装"},
                new CategoryViewModel{Id =2, FId=0, CategroyName="服装"},
                new CategoryViewModel{Id =2, FId=0, CategroyName="服装"},
                new CategoryViewModel{Id =2, FId=0, CategroyName="服装"},
                new CategoryViewModel{Id =2, FId=0, CategroyName="服装",IsSelected=true},
                new CategoryViewModel{Id =2, FId=0, CategroyName="服装"},
                new CategoryViewModel{Id =2, FId=0, CategroyName="服装"},
                new CategoryViewModel{Id =2, FId=0, CategroyName="服装"},
                new CategoryViewModel{Id =2, FId=0, CategroyName="服装"},
                new CategoryViewModel{Id =2, FId=0, CategroyName="服装"},
                new CategoryViewModel{Id =2, FId=0, CategroyName="服装"},
                new CategoryViewModel{Id =2, FId=0, CategroyName="服装"},
                new CategoryViewModel{Id =2, FId=0, CategroyName="服装"},
                new CategoryViewModel{Id =3, FId=0, CategroyName="服装"},
                new CategoryViewModel{Id =4, FId=0, CategroyName="服装"}
            };

            return PartialView("_CategoryPartial", category);
        }

        public PartialViewResult AreaView()
        {
            List<AreaViewModel> category = new List<AreaViewModel>
            { 
                new AreaViewModel{Id =1, FId=0, CategroyName="全部", IsSelected=true},
                new AreaViewModel{Id =2, FId=0, CategroyName="服装"},
                new AreaViewModel{Id =3, FId=0, CategroyName="服装"},
                new AreaViewModel{Id =4, FId=0, CategroyName="服装"}
            };

            return PartialView("_AreaPartial", category);
        }
    }
}
